<!--
 * @Descripttion: 
 * @Author: qinyonglian
 * @Date: 2021-02-07 10:16:28
 * @LastEditors: qinyonglian
 * @LastEditTime: 2021-02-07 11:41:24
-->
<template>
  <div class="log-list">
    <Header>
      <template #extra>
        <span>日志</span>
      </template>
      <!-- <template #left-extra>
        <i class="jeicon jeicon-angle-left" />
      </template> -->
    </Header>
    <div class="context">
      <ul>
        <li v-for="(item,index) of listData"
          :key="index"
          @tap="handlerForm(item)"
          >
            <span>{{item.RB_GZJD_NAME}}</span>
            <span class="time">{{item.RB_GSRQ}}</span>
          </li>
      </ul>
    </div>
  </div>
</template>

<script>

import Header from '@/components/header';


export default {
  name: 'list',
  components: {
    Header
  },
  data() {
    return {
      listData:[]
    };
  },
  watch: {
   
  },
  created() {
    this.initData();
  },
  mounted() {
    // 判断是否是APP window.plus 为true 的话，那么就是APP else 不是
    if(window.plus){
      // plus.
    } else {
      // 
    }
  },
  methods: {
     initData() {
      const params = {
        funcCode:'A_RB',
        funcId:'h6VVEyAdQAMsRxFNwIu',
        tableCode:'A_RB',
        limit:-1
      }
      JE.ajax({
        url:"/je/load",
        params,
        success:(obj)=>{
          console.log('111111111',obj);
          if(obj.success){
            this.listData = obj.rows;
          }
        }
      });
      
    },
    handlerForm(item){
      this.$router.push({
          path: '/JE-PLUGIN-LOG/detail',
          query: {
            item: { ...item },
          },
        });
    }
  },
};
</script>
<style lang="less" scoped>
  @import '~@/theme/index.less';
  .log-list{
    .context{
      overflow: auto;
      position: absolute;
      top: unit(48 * @hd, px);
      bottom: unit(60 * @hd, px);
      width: 100%;
      ul{
        li{
          height: unit(50 * @hd, px);
          font-size: unit(14 * @hd, px);
          line-height: unit(50 * @hd, px);
          border-bottom: 1px solid #c2c5cb;
          padding-left:unit(15 * @hd, px) ;
          padding-right:unit(15 * @hd, px) ;
          .time{
            float: right;
          }
        };
      }
    }
  }
</style>
